home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-01-02 | 2.3 KB | 72 lines | [TEXT/GEOL] |
- Item forwarded by LOOMIS to PLUMMER1 COWSAR1
-
- Item 1212293 24-Dec-89 05:06
-
- From: MADA.EUROPE MacApp Dev Assoc Europe, E Carrasco
-
- To: MACAPP.TECH$ MacApp Technical
-
- Sub: Bug found in TScrollBar Class
-
- Attn: MacApp technical list
- ⁄ MacApp.Tech$
-
- From: Father Vincent
- Traditions Monastiques
- France
- ⁄ MADA.Europe
-
- Sub: Bug found in TScrollBar Class
-
-
- Hi all,
- I have just found a bug in TScrollBar.IScrollBar Method. (File
- UMacApp.TControls.p in Libraries folder).
-
- The arguments itsVal, itsMin and itsMax are LongInt's and they are passed
- as actual arguments to ICtlMgr procedure. But unfortunately the corresponding
- formal arguments of ICtlMgr are Integers. When the value of these arguments
- is too large for an integer, a TRAPV exception happens. It is in particular
- the case when a view with large coordinates is used.
-
- Below is the Method with my correction. It works fine.
-
- I pass zero instead of the LongInt arguments for those parameters, since
- the Long values are set by SetLongValues a few lines below.
-
- (************************************************************************)
-
- PROCEDURE TScrollBar.IScrollBar(itsSuperView: TView; itsLocation, itsSize:
- VPoint; itsHSizeDet,
- itsVSizeDet: SizeDeterminer; itsDirection:
- VHSelect; itsVal, itsMin,
- itsMax: LONGINT);
-
- BEGIN
- {??? OLD VERSION ???}
- (* ICtlMgr(itsSuperView, itsLocation, itsSize, itsHSizeDet, itsVSizeDet, '',
- itsVal, itsMin,
- itsMax, scrollBarProc); *)
- {??? OLD VERSION ???}
-
- {??? Patch Begin : Replace itsMax, itsVal and itsMin by Zero to avoid INTEGER
- overflows ???}
- ICtlMgr(itsSuperView, itsLocation, itsSize, itsHSizeDet, itsVSizeDet, '',
- 0, 0,
- 0, scrollBarProc);
- {??? Patch End ???}
-
- fDirection := itsDirection;
- SetLongValues(itsVal, itsMin, itsMax, kDontRedraw);
- IF itsDirection = h THEN
- fDefChoice := mHScrollBarHit
- ELSE
- fDefChoice := mVScrollBarHit;
- END;
- (************************************************************************)
-
-
- (Bug report originally posted on CalvaCom, a French BBS. Eric
- We hope Father Vincent will join AppleLink ASAP)
-
-